\hypertarget{class_oss_audio}{\section{Oss\+Audio类 参考}
\label{class_oss_audio}\index{Oss\+Audio@{Oss\+Audio}}
}


Oss音频设备类.  




{\ttfamily \#include $<$Oss\+Audio.\+h$>$}

类 Oss\+Audio 继承关系图\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{class_oss_audio}
\end{center}
\end{figure}
\subsection*{Public 成员函数}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{class_oss_audio_aa1cc09430e9dc2543afb6fc37b6f8be6}{config} (int device, int channels, int rate, int bits)
\begin{DoxyCompactList}\small\item\em 配置音频设备 \end{DoxyCompactList}\item 
bool \hyperlink{class_oss_audio_a17285cccbda5fb20a50c34f326b7084f}{record\+Start} (int device, const string \&file\+Name)
\begin{DoxyCompactList}\small\item\em 开始录音 \end{DoxyCompactList}\item 
bool \hyperlink{class_oss_audio_ac724bc048b774fa4eb85d1e5aad14130}{record\+Stop} (int device)
\begin{DoxyCompactList}\small\item\em 停止录音 \end{DoxyCompactList}\item 
bool \hyperlink{class_oss_audio_ac88714699c9dd2a5ced640d5513fc8f4}{play\+Start} (int device, const string \&file\+Name)
\begin{DoxyCompactList}\small\item\em 开始放音 \end{DoxyCompactList}\item 
bool \hyperlink{class_oss_audio_ab951ebe06d70032ef53eae26f13767e6}{play\+Stop} (int device)
\begin{DoxyCompactList}\small\item\em 停止放音 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{静态 Public 成员函数}
\begin{DoxyCompactItemize}
\item 
static \hyperlink{class_oss_audio}{Oss\+Audio} $\ast$ \hyperlink{class_oss_audio_a8618297657fd24feecb6086397aca137}{get\+Instance} ()
\begin{DoxyCompactList}\small\item\em 获取\+Oss\+Audio单例 \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{详细描述}
Oss音频设备类. 

\subsection{成员函数说明}
\hypertarget{class_oss_audio_aa1cc09430e9dc2543afb6fc37b6f8be6}{\index{Oss\+Audio@{Oss\+Audio}!config@{config}}
\index{config@{config}!Oss\+Audio@{Oss\+Audio}}
\subsubsection[{config}]{\setlength{\rightskip}{0pt plus 5cm}bool Oss\+Audio\+::config (
\begin{DoxyParamCaption}
\item[{int}]{device, }
\item[{int}]{channels, }
\item[{int}]{rate, }
\item[{int}]{bits}
\end{DoxyParamCaption}
)}}\label{class_oss_audio_aa1cc09430e9dc2543afb6fc37b6f8be6}


配置音频设备 


\begin{DoxyParams}{参数}
{\em device} & 设备号,A\+U\+D\+I\+O\+\_\+\+D\+E\+V\+\_\+\+E \\
\hline
{\em channels} & 声道数 \\
\hline
{\em rate} & 采样速度 \\
\hline
{\em bits} & 采样位数 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回true,失败返回false 
\end{DoxyReturn}
\hypertarget{class_oss_audio_a8618297657fd24feecb6086397aca137}{\index{Oss\+Audio@{Oss\+Audio}!get\+Instance@{get\+Instance}}
\index{get\+Instance@{get\+Instance}!Oss\+Audio@{Oss\+Audio}}
\subsubsection[{get\+Instance}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Oss\+Audio}$\ast$ Oss\+Audio\+::get\+Instance (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{class_oss_audio_a8618297657fd24feecb6086397aca137}


获取\+Oss\+Audio单例 


\begin{DoxyParams}{参数}
{\em void} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
Oss\+Audio$\ast$ 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_oss_audio_ac88714699c9dd2a5ced640d5513fc8f4}{\index{Oss\+Audio@{Oss\+Audio}!play\+Start@{play\+Start}}
\index{play\+Start@{play\+Start}!Oss\+Audio@{Oss\+Audio}}
\subsubsection[{play\+Start}]{\setlength{\rightskip}{0pt plus 5cm}bool Oss\+Audio\+::play\+Start (
\begin{DoxyParamCaption}
\item[{int}]{device, }
\item[{const string \&}]{file\+Name}
\end{DoxyParamCaption}
)}}\label{class_oss_audio_ac88714699c9dd2a5ced640d5513fc8f4}


开始放音 


\begin{DoxyParams}{参数}
{\em device} & 设备号,A\+U\+D\+I\+O\+\_\+\+D\+E\+V\+\_\+\+E \\
\hline
{\em file\+Name} & 音频文件 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回true,失败返回false 
\end{DoxyReturn}
\hypertarget{class_oss_audio_ab951ebe06d70032ef53eae26f13767e6}{\index{Oss\+Audio@{Oss\+Audio}!play\+Stop@{play\+Stop}}
\index{play\+Stop@{play\+Stop}!Oss\+Audio@{Oss\+Audio}}
\subsubsection[{play\+Stop}]{\setlength{\rightskip}{0pt plus 5cm}bool Oss\+Audio\+::play\+Stop (
\begin{DoxyParamCaption}
\item[{int}]{device}
\end{DoxyParamCaption}
)}}\label{class_oss_audio_ab951ebe06d70032ef53eae26f13767e6}


停止放音 


\begin{DoxyParams}{参数}
{\em device} & 设备号,A\+U\+D\+I\+O\+\_\+\+D\+E\+V\+\_\+\+E \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回true,失败返回false 
\end{DoxyReturn}
\hypertarget{class_oss_audio_a17285cccbda5fb20a50c34f326b7084f}{\index{Oss\+Audio@{Oss\+Audio}!record\+Start@{record\+Start}}
\index{record\+Start@{record\+Start}!Oss\+Audio@{Oss\+Audio}}
\subsubsection[{record\+Start}]{\setlength{\rightskip}{0pt plus 5cm}bool Oss\+Audio\+::record\+Start (
\begin{DoxyParamCaption}
\item[{int}]{device, }
\item[{const string \&}]{file\+Name}
\end{DoxyParamCaption}
)}}\label{class_oss_audio_a17285cccbda5fb20a50c34f326b7084f}


开始录音 


\begin{DoxyParams}{参数}
{\em device} & 设备号,A\+U\+D\+I\+O\+\_\+\+D\+E\+V\+\_\+\+E \\
\hline
{\em file\+Name} & 录音保存文件 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回true,失败返回false 
\end{DoxyReturn}
\hypertarget{class_oss_audio_ac724bc048b774fa4eb85d1e5aad14130}{\index{Oss\+Audio@{Oss\+Audio}!record\+Stop@{record\+Stop}}
\index{record\+Stop@{record\+Stop}!Oss\+Audio@{Oss\+Audio}}
\subsubsection[{record\+Stop}]{\setlength{\rightskip}{0pt plus 5cm}bool Oss\+Audio\+::record\+Stop (
\begin{DoxyParamCaption}
\item[{int}]{device}
\end{DoxyParamCaption}
)}}\label{class_oss_audio_ac724bc048b774fa4eb85d1e5aad14130}


停止录音 


\begin{DoxyParams}{参数}
{\em device} & 设备号,A\+U\+D\+I\+O\+\_\+\+D\+E\+V\+\_\+\+E \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回true,失败返回false 
\end{DoxyReturn}


该类的文档由以下文件生成\+:\begin{DoxyCompactItemize}
\item 
libemb/inc/\hyperlink{_oss_audio_8h}{Oss\+Audio.\+h}\item 
libemb/src/Oss\+Audio.\+cpp\end{DoxyCompactItemize}
